package com.thomas.framework.utils;

import com.thomas.framework.core.EntityBase;
import com.thomas.framework.utils.mybatis.JsonResult;

import java.util.List;

/**
 * Created by taohj on 2014/4/17.
 * 分页查询工具类
 */
public class PageResult<T extends EntityBase>  extends JsonResult{


    //当前页
    private Integer page;

    //每页大小
    private Integer size;

    //总记录数
    private int total;



    //查询结果
    private List<T>  rows;



    //条件参数
    private T  t;


    //排序 列
    private String sort;

    //排序 正序 asc 或 逆序 desc
    private String order;


    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public PageResult<T> setRows(List<T> rows) {
        this.rows = rows; return this;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }


}
